const config = {};
config.keys = 'ant-plus-perm-2024-keys';
config.cors = {
  origin: '*',
  allowMethods: 'GET,POST,PUT,DELETE,PATCH,OPTIONS',
  credentials: true,
  exposeHeaders: ['Set-Cookie'],
};
config.session = {
  key: 'EGG_SESSION',
  maxAge: 24 * 3600 * 1000, // 1 天
  httpOnly: true,
  encrypt: true,
};
config.cookies = {
  maxAge: 24 * 3600 * 1000,
  httpOnly: true,
  signed: true,
};
config.security = {
  domainWhiteList: ['*'],
  csrf: {
    enable: false,
    enable: false, // 根据需要开启或关闭 CSRF 保护
    ignoreJSON: true,
  },
};
config.mysql = {
  client: {
    host: '127.0.0.1',
    port: '3306',
    user: 'root',
    password: '123456',
    database: 'ant_plus_perm',
  },
};
config.jwt = {
  secret: 'ant-plus-perm-2024', // 签发密钥
  expiresIn: '15m', // 短 token
  refreshSecret: 'ant-refresh-2024', // 刷新密钥
  refreshExpiresIn: '7d',
};

module.exports = config;
